package com.frame.demo.rest;

import android.text.TextUtils;

/**
 * Created by bingo on 2015/3/20.
 */
public class RestError {
    //业务code,就是响应体中json中的code字段的value
    private int mCode;
    private String message;
    //网络异常
    private int errorType ;

    public int getErrorType() {
        return errorType;
    }

    public void setErrorType(int pErrorType) {
        errorType = pErrorType;
    }

    public RestError(String msg) {
        this.message = msg;
    }

    public int getCode() {
        return mCode;
    }

    public void setCode(int code) {
        this.mCode = code;
    }

    public String getMsg() {
        return TextUtils.isEmpty(message) ? "" : message;
    }

    public void setMsg(String msg) {
        this.message = msg;
    }
}
